<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Kinetis Bootloader Host: RijndaelCTR Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Kinetis Bootloader Host
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
   <div id="projectbrief">Host Tools for Kinetis devices</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Introduction</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_rijndael_c_t_r.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="class_rijndael_c_t_r-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">RijndaelCTR Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Class to compute AES 128 CTR encryption/decryption.  
 <a href="class_rijndael_c_t_r.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="apps_2elftosb_2common_2_rijndael_c_t_r_8h_source.html">RijndaelCTR.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Collaboration diagram for RijndaelCTR:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="class_rijndael_c_t_r__coll__graph.svg" width="352" height="216"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a80f03bcae4c7c41a8cb61ab995c82390"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="class_rijndael_c_t_r.html#a0ac89cfc82f5831d01282c038c2332c1a62bed7966341d12377e2f0cd8054e79e">BLOCK_SIZE</a> = 16
 }</td></tr>
<tr class="separator:a80f03bcae4c7c41a8cb61ab995c82390"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ac89cfc82f5831d01282c038c2332c1"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="class_rijndael_c_t_r.html#a0ac89cfc82f5831d01282c038c2332c1a62bed7966341d12377e2f0cd8054e79e">BLOCK_SIZE</a> = 16
 }</td></tr>
<tr class="separator:a0ac89cfc82f5831d01282c038c2332c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae6071bfd2cd054b8edf03372dad88333"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae6071bfd2cd054b8edf03372dad88333"></a>
typedef uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rijndael_c_t_r.html#ae6071bfd2cd054b8edf03372dad88333">block_t</a>[<a class="el" href="class_rijndael_c_t_r.html#a0ac89cfc82f5831d01282c038c2332c1a62bed7966341d12377e2f0cd8054e79e">BLOCK_SIZE</a>]</td></tr>
<tr class="memdesc:ae6071bfd2cd054b8edf03372dad88333"><td class="mdescLeft">&#160;</td><td class="mdescRight">The cipher block data type. <br /></td></tr>
<tr class="separator:ae6071bfd2cd054b8edf03372dad88333"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae6071bfd2cd054b8edf03372dad88333"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae6071bfd2cd054b8edf03372dad88333"></a>
typedef uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rijndael_c_t_r.html#ae6071bfd2cd054b8edf03372dad88333">block_t</a>[<a class="el" href="class_rijndael_c_t_r.html#a0ac89cfc82f5831d01282c038c2332c1a62bed7966341d12377e2f0cd8054e79e">BLOCK_SIZE</a>]</td></tr>
<tr class="memdesc:ae6071bfd2cd054b8edf03372dad88333"><td class="mdescLeft">&#160;</td><td class="mdescRight">The cipher block data type. <br /></td></tr>
<tr class="separator:ae6071bfd2cd054b8edf03372dad88333"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ac503cef6bc9da8197f7e17adee9bc421"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rijndael_c_t_r.html#ac503cef6bc9da8197f7e17adee9bc421">RijndaelCTR</a> (const <a class="el" href="class_a_e_s_key.html">AESKey</a>&lt; 128 &gt; &amp;key, const <a class="el" href="class_a_e_s_counter.html">AESCounter</a>&lt; 128 &gt; &amp;counter)</td></tr>
<tr class="memdesc:ac503cef6bc9da8197f7e17adee9bc421"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="#ac503cef6bc9da8197f7e17adee9bc421">More...</a><br /></td></tr>
<tr class="separator:ac503cef6bc9da8197f7e17adee9bc421"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a76173a1319f588eba0a7cb7b828ccb58"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a76173a1319f588eba0a7cb7b828ccb58"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rijndael_c_t_r.html#a76173a1319f588eba0a7cb7b828ccb58">encrypt</a> (const uint8_t *data, unsigned length, uint8_t *dest)</td></tr>
<tr class="memdesc:a76173a1319f588eba0a7cb7b828ccb58"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encrypt data. <br /></td></tr>
<tr class="separator:a76173a1319f588eba0a7cb7b828ccb58"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a746c7bf0a10c9667a3d9f50193c18841"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a746c7bf0a10c9667a3d9f50193c18841"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rijndael_c_t_r.html#a746c7bf0a10c9667a3d9f50193c18841">decrypt</a> (const uint8_t *data, unsigned length, uint8_t *dest)</td></tr>
<tr class="memdesc:a746c7bf0a10c9667a3d9f50193c18841"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encrypt data. <br /></td></tr>
<tr class="separator:a746c7bf0a10c9667a3d9f50193c18841"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a73b88637f6b396f2b34a12e67dc58340"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a73b88637f6b396f2b34a12e67dc58340"></a>
<a class="el" href="class_rijndael_c_t_r.html">RijndaelCTR</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rijndael_c_t_r.html#a73b88637f6b396f2b34a12e67dc58340">operator=</a> (const <a class="el" href="class_rijndael_c_t_r.html">RijndaelCTR</a> &amp;other)</td></tr>
<tr class="memdesc:a73b88637f6b396f2b34a12e67dc58340"><td class="mdescLeft">&#160;</td><td class="mdescRight">Assignment operator. <br /></td></tr>
<tr class="separator:a73b88637f6b396f2b34a12e67dc58340"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac503cef6bc9da8197f7e17adee9bc421"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac503cef6bc9da8197f7e17adee9bc421"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rijndael_c_t_r.html#ac503cef6bc9da8197f7e17adee9bc421">RijndaelCTR</a> (const <a class="el" href="class_a_e_s_key.html">AESKey</a>&lt; 128 &gt; &amp;key, const <a class="el" href="class_a_e_s_counter.html">AESCounter</a>&lt; 128 &gt; &amp;counter)</td></tr>
<tr class="memdesc:ac503cef6bc9da8197f7e17adee9bc421"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br /></td></tr>
<tr class="separator:ac503cef6bc9da8197f7e17adee9bc421"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a76173a1319f588eba0a7cb7b828ccb58"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a76173a1319f588eba0a7cb7b828ccb58"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rijndael_c_t_r.html#a76173a1319f588eba0a7cb7b828ccb58">encrypt</a> (const uint8_t *data, unsigned length, uint8_t *dest)</td></tr>
<tr class="memdesc:a76173a1319f588eba0a7cb7b828ccb58"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encrypt data. <br /></td></tr>
<tr class="separator:a76173a1319f588eba0a7cb7b828ccb58"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a746c7bf0a10c9667a3d9f50193c18841"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a746c7bf0a10c9667a3d9f50193c18841"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rijndael_c_t_r.html#a746c7bf0a10c9667a3d9f50193c18841">decrypt</a> (const uint8_t *data, unsigned length, uint8_t *dest)</td></tr>
<tr class="memdesc:a746c7bf0a10c9667a3d9f50193c18841"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encrypt data. <br /></td></tr>
<tr class="separator:a746c7bf0a10c9667a3d9f50193c18841"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a73b88637f6b396f2b34a12e67dc58340"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a73b88637f6b396f2b34a12e67dc58340"></a>
<a class="el" href="class_rijndael_c_t_r.html">RijndaelCTR</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rijndael_c_t_r.html#a73b88637f6b396f2b34a12e67dc58340">operator=</a> (const <a class="el" href="class_rijndael_c_t_r.html">RijndaelCTR</a> &amp;other)</td></tr>
<tr class="memdesc:a73b88637f6b396f2b34a12e67dc58340"><td class="mdescLeft">&#160;</td><td class="mdescRight">Assignment operator. <br /></td></tr>
<tr class="separator:a73b88637f6b396f2b34a12e67dc58340"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:afdf3139aee10d013be9785ffe91c76d3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afdf3139aee10d013be9785ffe91c76d3"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>incrementCounter</b> (<a class="el" href="class_a_e_s_counter.html">AESCounter</a>&lt; 128 &gt;::counter_t *counter)</td></tr>
<tr class="separator:afdf3139aee10d013be9785ffe91c76d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a73efb45edd6fe707902bb93c2036c429"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a73efb45edd6fe707902bb93c2036c429"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>baseProcess</b> (const uint8_t *data, unsigned length, uint8_t *dest)</td></tr>
<tr class="separator:a73efb45edd6fe707902bb93c2036c429"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afdf3139aee10d013be9785ffe91c76d3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afdf3139aee10d013be9785ffe91c76d3"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>incrementCounter</b> (<a class="el" href="class_a_e_s_counter.html">AESCounter</a>&lt; 128 &gt;::counter_t *counter)</td></tr>
<tr class="separator:afdf3139aee10d013be9785ffe91c76d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a73efb45edd6fe707902bb93c2036c429"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a73efb45edd6fe707902bb93c2036c429"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>baseProcess</b> (const uint8_t *data, unsigned length, uint8_t *dest)</td></tr>
<tr class="separator:a73efb45edd6fe707902bb93c2036c429"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:aabe78454c0d517f75ce92b31d12fec66"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aabe78454c0d517f75ce92b31d12fec66"></a>
<a class="el" href="class_a_e_s_key.html">AESKey</a>&lt; 128 &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rijndael_c_t_r.html#aabe78454c0d517f75ce92b31d12fec66">m_key</a></td></tr>
<tr class="memdesc:aabe78454c0d517f75ce92b31d12fec66"><td class="mdescLeft">&#160;</td><td class="mdescRight">128-bit key to use for encrypt/decrypt <br /></td></tr>
<tr class="separator:aabe78454c0d517f75ce92b31d12fec66"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a106df586c6464a7220f30b0595f6912a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a106df586c6464a7220f30b0595f6912a"></a>
<a class="el" href="class_a_e_s_counter.html">AESCounter</a>&lt; 128 &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rijndael_c_t_r.html#a106df586c6464a7220f30b0595f6912a">m_counter</a></td></tr>
<tr class="memdesc:a106df586c6464a7220f30b0595f6912a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Counter value for encrypt/decrypt. <br /></td></tr>
<tr class="separator:a106df586c6464a7220f30b0595f6912a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Class to compute AES 128 CTR encryption/decryption. </p>
<p>Currently only supports 128-bit keys and block sizes. </p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a class="anchor" id="a80f03bcae4c7c41a8cb61ab995c82390"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum</td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="a0ac89cfc82f5831d01282c038c2332c1a62bed7966341d12377e2f0cd8054e79e"></a>BLOCK_SIZE&#160;</td><td class="fielddoc">
<p>Number of bytes in one cipher block. </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="a0ac89cfc82f5831d01282c038c2332c1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum</td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="a0ac89cfc82f5831d01282c038c2332c1a62bed7966341d12377e2f0cd8054e79e"></a>BLOCK_SIZE&#160;</td><td class="fielddoc">
<p>Number of bytes in one cipher block. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ac503cef6bc9da8197f7e17adee9bc421"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RijndaelCTR::RijndaelCTR </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_a_e_s_key.html">AESKey</a>&lt; 128 &gt; &amp;&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_a_e_s_counter.html">AESCounter</a>&lt; 128 &gt; &amp;&#160;</td>
          <td class="paramname"><em>counter</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">key</td><td>The key to use </td></tr>
    <tr><td class="paramname">counter</td><td>The counter to use </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="apps_2elftosb_2common_2_rijndael_c_t_r_8h_source.html">apps/elftosb/common/RijndaelCTR.h</a></li>
<li>apps/elftosb/common/RijndaelCTR.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_rijndael_c_t_r.html">RijndaelCTR</a></li>
    <li class="footer">Generated on Mon Mar 7 2016 16:49:51 for Kinetis Bootloader Host by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
